<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>局部组件注册语法糖方式</title>
    <script src="../lib/vue_v2.6.14.js"></script>
  </head>
  <body>
    <div id="app">
      <my-cpn></my-cpn>
    </div>

    <script>
      const vm = new Vue({
        el: '#app',
        data: {},
        components: {
          'my-cpn': {
            template: `
              <div>
                <h2>{{ title }}</h2>
              </div>
            `,
            data() {
              return {
                title: '局部组件-语法糖方式'
              }
            }
          }
        }
      })
    </script>
  </body>
</html>
